package com.well.register.console.controller;

import com.well.register.console.service.UserService;
import com.well.register.console.util.RpcResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 用户管理面
 * </p>
 *
 * @author weedo
 * @since 2022/7/31
 */

@Slf4j
@RestController
@RequestMapping("user")
public class UserController {

    @Resource
    private UserService userService;

    @PostMapping("login")
    public RpcResponse getUserByUsernamePassword(String username, String password) {
        return userService.getUserByUsernamePassword(username, password);
    }
}
